
test_dic = {
    "status": 0,
    "error": "",
    "body": [
        {
            "serviceUser": {
                "id": 7719,
                "trueName": "胡海玉",
                "recommend": False,
                "profile": "https://yueguanjia-bucket.oss-cn-hangzhou.aliyuncs.com/843be801-4b2e-44e8-af6f-1128c1972c84.png",
                "praiseRate": 100,
                "recommendTag": "随机"
            },
            "weeks": [
                {
                    "weekCode": 1,
                    "name": "周一",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 1,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 1,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 1,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 1,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 2,
                    "name": "周二",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 2,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 2,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 2,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 3,
                    "name": "周三",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 3,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 3,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 3,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 4,
                    "name": "周四",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 4,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 4,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 4,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 5,
                    "name": "周五",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 5,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 5,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 5,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 6,
                    "name": "周六",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 6,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 6,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 6,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 7,
                    "name": "周日",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 7,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 7,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 7,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "serviceUser": {
                "id": 2869,
                "trueName": "刘见民",
                "recommend": False,
                "profile": "https://yueguanjia-bucket.oss-cn-hangzhou.aliyuncs.com/b5f4c8f6-7c84-490d-af52-c75ad80c43c3.png",
                "praiseRate": 99,
                "recommendTag": "随机"
            },
            "weeks": [
                {
                    "weekCode": 1,
                    "name": "周一",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 1,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 1,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 1,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 1,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 0
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 2,
                    "name": "周二",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 2,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 2,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 2,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 2,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 2,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 2,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 2,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 2,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 3,
                    "name": "周三",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 3,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 3,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 3,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 3,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 4,
                    "name": "周四",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 4,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 4,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 4,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 4,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 4,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 5,
                    "name": "周五",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 5,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 5,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 5,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 5,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 6,
                    "name": "周六",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 6,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 6,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 0
                                },
                                {
                                    "weekCode": 6,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 0
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 6,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 6,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                },
                {
                    "weekCode": 7,
                    "name": "周日",
                    "display": True,
                    "enable": True,
                    "dayPart": [
                        {
                            "name": "上午",
                            "times": [
                                {
                                    "weekCode": 7,
                                    "id": 1,
                                    "name": "08:00-10:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 6,
                                    "name": "10:30-12:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 7,
                                    "name": "11:00-13:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 8,
                                    "name": "11:30-13:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "下午",
                            "times": [
                                {
                                    "weekCode": 7,
                                    "id": 9,
                                    "name": "12:00-14:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 10,
                                    "name": "12:30-14:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 11,
                                    "name": "13:00-15:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 12,
                                    "name": "13:30-15:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 13,
                                    "name": "14:00-16:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 14,
                                    "name": "14:30-16:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 15,
                                    "name": "15:00-17:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 16,
                                    "name": "15:30-17:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 17,
                                    "name": "16:00-18:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 18,
                                    "name": "16:30-18:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 19,
                                    "name": "17:00-19:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 20,
                                    "name": "17:30-19:30",
                                    "stock": 1
                                }
                            ]
                        },
                        {
                            "name": "晚上",
                            "times": [
                                {
                                    "weekCode": 7,
                                    "id": 21,
                                    "name": "18:00-20:00",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 22,
                                    "name": "18:30-20:30",
                                    "stock": 1
                                },
                                {
                                    "weekCode": 7,
                                    "id": 23,
                                    "name": "19:00-21:00",
                                    "stock": 1
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

first_data_dic = {"status":0,
                  "error":"",
                  "body":{"recommend":{"people":1,"time":4},
                          "list":[{"date":"2022-01-23","week":7,"startTime":"11:00","weekDes":"周日","stocks":1},
                                  {"date":"2022-02-13","week":7,"startTime":"11:00","weekDes":"周日","stocks":1}]}}
import random
# 获取可用的第一次服务时间及服务者列表
def order_time_choose(data_dic):
    result_list = []
    for i in data_dic['body']:
        for j in i['weeks']:
            for m in j['dayPart']:
                for n in m['times']:
                    if n['stock'] == 1:
                        weekCode = n['weekCode']
                        timeId = n['id']
                        serviceUser = i['serviceUser']['id']
                        result_dic = {"time1": weekCode, "time2": timeId,"serviceId": [serviceUser]}
                        result_list.append(result_dic)
                    else:
                        continue
    for i in result_list:
        for j in result_list:
            if i['time1'] == j['time1'] and i['time2'] == j['time2']:
                if j['serviceId'][0] not in i['serviceId']:
                    i['serviceId'].append(j['serviceId'][0])
                else:
                    continue
                if i['serviceId'][0] not in j['serviceId']:
                    j['serviceId'].append(i['serviceId'][0])
                else:
                    continue
            else:
                continue
    ln = len(result_list)
    # print('时间结果列表',result_list)
    # 随机取可用的库存时间点
    a = random.randint(0, ln - 1)
    # print(result_list[a])
    return result_list[a]

# 随机获取第一次服务时间
def first_order_time_choose(data_dic):
    result_list = []
    for i in data_dic['body']['list']:
        if len(i) > 0:
            if i['stocks'] == 1:
                date = i['date']
                result_dic = {"serviceTime":date}
                result_list.append(result_dic)
            else:
                continue
        else:
            return
    print(result_list)
    ln = len(result_list)
    a = random.randint(0, ln - 1)
    # print(result_list[a])
    return result_list[a]

if __name__ == '__main__':
    # order_time_choose(test_dic)
    first_order_time_choose(first_data_dic)
